package eu.pago.chat.gui;

import java.awt.BorderLayout;
import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class AddFriendFrame extends JFrame {

	private static final long serialVersionUID = 1L;

	public AddFriendFrame() {
		this.setLayout(new BorderLayout());
		add(createAddFriendField(), BorderLayout.NORTH);
		add(createSendRequestButton(), BorderLayout.CENTER);
	}

	public JPanel createAddFriendField() {
		JPanel addFriendPanel = new JPanel();
		addFriendPanel.setLayout(new GridLayout(0, 2));
		JLabel friendUsernameLabel = new JLabel("Friend Username:");
		addFriendPanel.add(friendUsernameLabel);
		JTextField usernameField = new JTextField();
		addFriendPanel.add(usernameField);
		return addFriendPanel;
	}

	public JPanel createSendRequestButton() {
		JPanel addButtonPanel = new JPanel();
		JButton addFriendButton = new JButton("Add friend");
		addButtonPanel.add(addFriendButton);
		return addButtonPanel;
	}

}
